package cn.edu.scau.cmi.hombio.web.rest;

import cn.edu.scau.cmi.hombio.dao.CurePigDAO;
import cn.edu.scau.cmi.hombio.dao.EmployeeDAO;
import cn.edu.scau.cmi.hombio.dao.ExceptDAO;
import cn.edu.scau.cmi.hombio.dao.ExceptionTypeEmployeeDAO;
import cn.edu.scau.cmi.hombio.dao.FeedDAO;
import cn.edu.scau.cmi.hombio.dao.FodderStorageDAO;
import cn.edu.scau.cmi.hombio.dao.FodderTakeDAO;
import cn.edu.scau.cmi.hombio.dao.InspectionDAO;
import cn.edu.scau.cmi.hombio.dao.MedicineStorageDAO;
import cn.edu.scau.cmi.hombio.dao.MedicineTakeDAO;
import cn.edu.scau.cmi.hombio.dao.PreventionDAO;
import cn.edu.scau.cmi.hombio.dao.RoleEmployeeDAO;
import cn.edu.scau.cmi.hombio.dao.SaleDAO;
import cn.edu.scau.cmi.hombio.dao.TaskDAO;
import cn.edu.scau.cmi.hombio.dao.TaskEmployeeDAO;
import cn.edu.scau.cmi.hombio.dao.TaskManageDAO;

import cn.edu.scau.cmi.hombio.domain.CurePig;
import cn.edu.scau.cmi.hombio.domain.Employee;
import cn.edu.scau.cmi.hombio.domain.Except;
import cn.edu.scau.cmi.hombio.domain.ExceptionTypeEmployee;
import cn.edu.scau.cmi.hombio.domain.Feed;
import cn.edu.scau.cmi.hombio.domain.FodderStorage;
import cn.edu.scau.cmi.hombio.domain.FodderTake;
import cn.edu.scau.cmi.hombio.domain.Inspection;
import cn.edu.scau.cmi.hombio.domain.MedicineStorage;
import cn.edu.scau.cmi.hombio.domain.MedicineTake;
import cn.edu.scau.cmi.hombio.domain.Prevention;
import cn.edu.scau.cmi.hombio.domain.RoleEmployee;
import cn.edu.scau.cmi.hombio.domain.Sale;
import cn.edu.scau.cmi.hombio.domain.Task;
import cn.edu.scau.cmi.hombio.domain.TaskEmployee;
import cn.edu.scau.cmi.hombio.domain.TaskManage;

import cn.edu.scau.cmi.hombio.service.EmployeeService;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.WebDataBinder;

import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Spring Rest controller that handles CRUD requests for Employee entities
 * 
 */

@Controller("EmployeeRestController")

public class EmployeeRestController {

	/**
	 * DAO injected by Spring that manages CurePig entities
	 * 
	 */
	@Autowired
	private CurePigDAO curePigDAO;

	/**
	 * DAO injected by Spring that manages Employee entities
	 * 
	 */
	@Autowired
	private EmployeeDAO employeeDAO;

	/**
	 * DAO injected by Spring that manages Except entities
	 * 
	 */
	@Autowired
	private ExceptDAO exceptDAO;

	/**
	 * DAO injected by Spring that manages ExceptionTypeEmployee entities
	 * 
	 */
	@Autowired
	private ExceptionTypeEmployeeDAO exceptionTypeEmployeeDAO;

	/**
	 * DAO injected by Spring that manages Feed entities
	 * 
	 */
	@Autowired
	private FeedDAO feedDAO;

	/**
	 * DAO injected by Spring that manages FodderStorage entities
	 * 
	 */
	@Autowired
	private FodderStorageDAO fodderStorageDAO;

	/**
	 * DAO injected by Spring that manages FodderTake entities
	 * 
	 */
	@Autowired
	private FodderTakeDAO fodderTakeDAO;

	/**
	 * DAO injected by Spring that manages Inspection entities
	 * 
	 */
	@Autowired
	private InspectionDAO inspectionDAO;

	/**
	 * DAO injected by Spring that manages MedicineStorage entities
	 * 
	 */
	@Autowired
	private MedicineStorageDAO medicineStorageDAO;

	/**
	 * DAO injected by Spring that manages MedicineTake entities
	 * 
	 */
	@Autowired
	private MedicineTakeDAO medicineTakeDAO;

	/**
	 * DAO injected by Spring that manages Prevention entities
	 * 
	 */
	@Autowired
	private PreventionDAO preventionDAO;

	/**
	 * DAO injected by Spring that manages RoleEmployee entities
	 * 
	 */
	@Autowired
	private RoleEmployeeDAO roleEmployeeDAO;

	/**
	 * DAO injected by Spring that manages Sale entities
	 * 
	 */
	@Autowired
	private SaleDAO saleDAO;

	/**
	 * DAO injected by Spring that manages Task entities
	 * 
	 */
	@Autowired
	private TaskDAO taskDAO;

	/**
	 * DAO injected by Spring that manages TaskEmployee entities
	 * 
	 */
	@Autowired
	private TaskEmployeeDAO taskEmployeeDAO;

	/**
	 * DAO injected by Spring that manages TaskManage entities
	 * 
	 */
	@Autowired
	private TaskManageDAO taskManageDAO;

	/**
	 * Service injected by Spring that provides CRUD operations for Employee entities
	 * 
	 */
	@Autowired
	private EmployeeService employeeService;

	/**
	 * Delete an existing Feed entity
	 * 
	 */
	@RequestMapping(value = "/Employee/{employee_id}/feeds/{feed_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeFeeds(@PathVariable Integer employee_id, @PathVariable Integer related_feeds_id) {
		employeeService.deleteEmployeeFeeds(employee_id, related_feeds_id);
	}

	/**
	* Delete an existing TaskManage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskManages/{taskmanage_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeTaskManages(@PathVariable Integer employee_id, @PathVariable Integer related_taskmanages_id) {
		employeeService.deleteEmployeeTaskManages(employee_id, related_taskmanages_id);
	}

	/**
	* Create a new TaskEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskEmployees", method = RequestMethod.POST)
	@ResponseBody
	public TaskEmployee newEmployeeTaskEmployees(@PathVariable Integer employee_id, @RequestBody TaskEmployee taskemployee) {
		employeeService.saveEmployeeTaskEmployees(employee_id, taskemployee);
		return taskEmployeeDAO.findTaskEmployeeByPrimaryKey(taskemployee.getId());
	}

	/**
	* Show all MedicineTake entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForTakerId", method = RequestMethod.GET)
	@ResponseBody
	public List<MedicineTake> getEmployeeMedicineTakesForTakerId(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<MedicineTake>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getMedicineTakesForTakerId());
	}

	/**
	* Create a new TaskManage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskManages", method = RequestMethod.POST)
	@ResponseBody
	public TaskManage newEmployeeTaskManages(@PathVariable Integer employee_id, @RequestBody TaskManage taskmanage) {
		employeeService.saveEmployeeTaskManages(employee_id, taskmanage);
		return taskManageDAO.findTaskManageByPrimaryKey(taskmanage.getId());
	}

	/**
	* Delete an existing Except entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/excepts/{except_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeExcepts(@PathVariable Integer employee_id, @PathVariable Integer related_excepts_id) {
		employeeService.deleteEmployeeExcepts(employee_id, related_excepts_id);
	}

	/**
	* View an existing RoleEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/roleEmployees/{roleemployee_id}", method = RequestMethod.GET)
	@ResponseBody
	public RoleEmployee loadEmployeeRoleEmployees(@PathVariable Integer employee_id, @PathVariable Integer related_roleemployees_id) {
		RoleEmployee roleemployee = roleEmployeeDAO.findRoleEmployeeByPrimaryKey(related_roleemployees_id, -1, -1);

		return roleemployee;
	}

	/**
	* Delete an existing MedicineStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineStorages/{medicinestorage_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeMedicineStorages(@PathVariable Integer employee_id, @PathVariable Integer related_medicinestorages_id) {
		employeeService.deleteEmployeeMedicineStorages(employee_id, related_medicinestorages_id);
	}

	/**
	* Delete an existing RoleEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/roleEmployees/{roleemployee_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeRoleEmployees(@PathVariable Integer employee_id, @PathVariable Integer related_roleemployees_id) {
		employeeService.deleteEmployeeRoleEmployees(employee_id, related_roleemployees_id);
	}

	/**
	* Create a new FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForWarehousekepperId", method = RequestMethod.POST)
	@ResponseBody
	public FodderTake newEmployeeFodderTakesForWarehousekepperId(@PathVariable Integer employee_id, @RequestBody FodderTake foddertake) {
		employeeService.saveEmployeeFodderTakesForWarehousekepperId(employee_id, foddertake);
		return fodderTakeDAO.findFodderTakeByPrimaryKey(foddertake.getId());
	}

	/**
	* Save an existing ExceptionTypeEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/exceptionTypeEmployees", method = RequestMethod.PUT)
	@ResponseBody
	public ExceptionTypeEmployee saveEmployeeExceptionTypeEmployees(@PathVariable Integer employee_id, @RequestBody ExceptionTypeEmployee exceptiontypeemployees) {
		employeeService.saveEmployeeExceptionTypeEmployees(employee_id, exceptiontypeemployees);
		return exceptionTypeEmployeeDAO.findExceptionTypeEmployeeByPrimaryKey(exceptiontypeemployees.getId());
	}

	/**
	* Show all Except entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/excepts", method = RequestMethod.GET)
	@ResponseBody
	public List<Except> getEmployeeExcepts(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<Except>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getExcepts());
	}

	/**
	* View an existing TaskManage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskManages/{taskmanage_id}", method = RequestMethod.GET)
	@ResponseBody
	public TaskManage loadEmployeeTaskManages(@PathVariable Integer employee_id, @PathVariable Integer related_taskmanages_id) {
		TaskManage taskmanage = taskManageDAO.findTaskManageByPrimaryKey(related_taskmanages_id, -1, -1);

		return taskmanage;
	}

	/**
	* Save an existing Employee entity
	* 
	*/
	@RequestMapping(value = "/Employee", method = RequestMethod.PUT)
	@ResponseBody
	public Employee saveEmployee(@RequestBody Employee employee) {
		employeeService.saveEmployee(employee);
		return employeeDAO.findEmployeeByPrimaryKey(employee.getId());
	}

	/**
	* Show all RoleEmployee entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/roleEmployees", method = RequestMethod.GET)
	@ResponseBody
	public List<RoleEmployee> getEmployeeRoleEmployees(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<RoleEmployee>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getRoleEmployees());
	}

	/**
	* Create a new Sale entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/sales", method = RequestMethod.POST)
	@ResponseBody
	public Sale newEmployeeSales(@PathVariable Integer employee_id, @RequestBody Sale sale) {
		employeeService.saveEmployeeSales(employee_id, sale);
		return saleDAO.findSaleByPrimaryKey(sale.getId());
	}

	/**
	* Delete an existing Prevention entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/preventions/{prevention_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeePreventions(@PathVariable Integer employee_id, @PathVariable Integer related_preventions_id) {
		employeeService.deleteEmployeePreventions(employee_id, related_preventions_id);
	}

	/**
	* Show all MedicineStorage entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineStorages", method = RequestMethod.GET)
	@ResponseBody
	public List<MedicineStorage> getEmployeeMedicineStorages(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<MedicineStorage>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getMedicineStorages());
	}

	/**
	* Delete an existing Sale entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/sales/{sale_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeSales(@PathVariable Integer employee_id, @PathVariable Integer related_sales_id) {
		employeeService.deleteEmployeeSales(employee_id, related_sales_id);
	}

	/**
	* Create a new Except entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/excepts", method = RequestMethod.POST)
	@ResponseBody
	public Except newEmployeeExcepts(@PathVariable Integer employee_id, @RequestBody Except except) {
		employeeService.saveEmployeeExcepts(employee_id, except);
		return exceptDAO.findExceptByPrimaryKey(except.getId());
	}

	/**
	* Save an existing TaskManage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskManages", method = RequestMethod.PUT)
	@ResponseBody
	public TaskManage saveEmployeeTaskManages(@PathVariable Integer employee_id, @RequestBody TaskManage taskmanages) {
		employeeService.saveEmployeeTaskManages(employee_id, taskmanages);
		return taskManageDAO.findTaskManageByPrimaryKey(taskmanages.getId());
	}

	/**
	* Create a new ExceptionTypeEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/exceptionTypeEmployees", method = RequestMethod.POST)
	@ResponseBody
	public ExceptionTypeEmployee newEmployeeExceptionTypeEmployees(@PathVariable Integer employee_id, @RequestBody ExceptionTypeEmployee exceptiontypeemployee) {
		employeeService.saveEmployeeExceptionTypeEmployees(employee_id, exceptiontypeemployee);
		return exceptionTypeEmployeeDAO.findExceptionTypeEmployeeByPrimaryKey(exceptiontypeemployee.getId());
	}

	/**
	* Create a new MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForPharmacistId", method = RequestMethod.POST)
	@ResponseBody
	public MedicineTake newEmployeeMedicineTakesForPharmacistId(@PathVariable Integer employee_id, @RequestBody MedicineTake medicinetake) {
		employeeService.saveEmployeeMedicineTakesForPharmacistId(employee_id, medicinetake);
		return medicineTakeDAO.findMedicineTakeByPrimaryKey(medicinetake.getId());
	}

	/**
	* Save an existing RoleEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/roleEmployees", method = RequestMethod.PUT)
	@ResponseBody
	public RoleEmployee saveEmployeeRoleEmployees(@PathVariable Integer employee_id, @RequestBody RoleEmployee roleemployees) {
		employeeService.saveEmployeeRoleEmployees(employee_id, roleemployees);
		return roleEmployeeDAO.findRoleEmployeeByPrimaryKey(roleemployees.getId());
	}

	/**
	* Create a new FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForEmployeeId", method = RequestMethod.POST)
	@ResponseBody
	public FodderTake newEmployeeFodderTakesForEmployeeId(@PathVariable Integer employee_id, @RequestBody FodderTake foddertake) {
		employeeService.saveEmployeeFodderTakesForEmployeeId(employee_id, foddertake);
		return fodderTakeDAO.findFodderTakeByPrimaryKey(foddertake.getId());
	}

	/**
	* Show all FodderTake entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForWarehousekepperId", method = RequestMethod.GET)
	@ResponseBody
	public List<FodderTake> getEmployeeFodderTakesForWarehousekepperId(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<FodderTake>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getFodderTakesForWarehousekepperId());
	}

	/**
	* Save an existing CurePig entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/curePigs", method = RequestMethod.PUT)
	@ResponseBody
	public CurePig saveEmployeeCurePigs(@PathVariable Integer employee_id, @RequestBody CurePig curepigs) {
		employeeService.saveEmployeeCurePigs(employee_id, curepigs);
		return curePigDAO.findCurePigByPrimaryKey(curepigs.getId());
	}

	/**
	* Create a new CurePig entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/curePigs", method = RequestMethod.POST)
	@ResponseBody
	public CurePig newEmployeeCurePigs(@PathVariable Integer employee_id, @RequestBody CurePig curepig) {
		employeeService.saveEmployeeCurePigs(employee_id, curepig);
		return curePigDAO.findCurePigByPrimaryKey(curepig.getId());
	}

	/**
	* Save an existing MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForPharmacistId", method = RequestMethod.PUT)
	@ResponseBody
	public MedicineTake saveEmployeeMedicineTakesForPharmacistId(@PathVariable Integer employee_id, @RequestBody MedicineTake medicinetakesforpharmacistid) {
		employeeService.saveEmployeeMedicineTakesForPharmacistId(employee_id, medicinetakesforpharmacistid);
		return medicineTakeDAO.findMedicineTakeByPrimaryKey(medicinetakesforpharmacistid.getId());
	}

	/**
	* Save an existing Feed entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/feeds", method = RequestMethod.PUT)
	@ResponseBody
	public Feed saveEmployeeFeeds(@PathVariable Integer employee_id, @RequestBody Feed feeds) {
		employeeService.saveEmployeeFeeds(employee_id, feeds);
		return feedDAO.findFeedByPrimaryKey(feeds.getId());
	}

	/**
	* Create a new Employee entity
	* 
	*/
	@RequestMapping(value = "/Employee", method = RequestMethod.POST)
	@ResponseBody
	public Employee newEmployee(@RequestBody Employee employee) {
		employeeService.saveEmployee(employee);
		return employeeDAO.findEmployeeByPrimaryKey(employee.getId());
	}

	/**
	* View an existing CurePig entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/curePigs/{curepig_id}", method = RequestMethod.GET)
	@ResponseBody
	public CurePig loadEmployeeCurePigs(@PathVariable Integer employee_id, @PathVariable Integer related_curepigs_id) {
		CurePig curepig = curePigDAO.findCurePigByPrimaryKey(related_curepigs_id, -1, -1);

		return curepig;
	}

	/**
	* Select an existing Employee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}", method = RequestMethod.GET)
	@ResponseBody
	public Employee loadEmployee(@PathVariable Integer employee_id) {
		return employeeDAO.findEmployeeByPrimaryKey(employee_id);
	}

	/**
	* View an existing TaskEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskEmployees/{taskemployee_id}", method = RequestMethod.GET)
	@ResponseBody
	public TaskEmployee loadEmployeeTaskEmployees(@PathVariable Integer employee_id, @PathVariable Integer related_taskemployees_id) {
		TaskEmployee taskemployee = taskEmployeeDAO.findTaskEmployeeByPrimaryKey(related_taskemployees_id, -1, -1);

		return taskemployee;
	}

	/**
	* Show all FodderTake entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForEmployeeId", method = RequestMethod.GET)
	@ResponseBody
	public List<FodderTake> getEmployeeFodderTakesForEmployeeId(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<FodderTake>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getFodderTakesForEmployeeId());
	}

	/**
	* Show all Prevention entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/preventions", method = RequestMethod.GET)
	@ResponseBody
	public List<Prevention> getEmployeePreventions(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<Prevention>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getPreventions());
	}

	/**
	* View an existing Task entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/tasks/{task_id}", method = RequestMethod.GET)
	@ResponseBody
	public Task loadEmployeeTasks(@PathVariable Integer employee_id, @PathVariable Integer related_tasks_id) {
		Task task = taskDAO.findTaskByPrimaryKey(related_tasks_id, -1, -1);

		return task;
	}

	/**
	* Show all FodderStorage entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderStorages", method = RequestMethod.GET)
	@ResponseBody
	public List<FodderStorage> getEmployeeFodderStorages(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<FodderStorage>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getFodderStorages());
	}

	/**
	* Save an existing MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForTakerId", method = RequestMethod.PUT)
	@ResponseBody
	public MedicineTake saveEmployeeMedicineTakesForTakerId(@PathVariable Integer employee_id, @RequestBody MedicineTake medicinetakesfortakerid) {
		employeeService.saveEmployeeMedicineTakesForTakerId(employee_id, medicinetakesfortakerid);
		return medicineTakeDAO.findMedicineTakeByPrimaryKey(medicinetakesfortakerid.getId());
	}

	/**
	* View an existing ExceptionTypeEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/exceptionTypeEmployees/{exceptiontypeemployee_id}", method = RequestMethod.GET)
	@ResponseBody
	public ExceptionTypeEmployee loadEmployeeExceptionTypeEmployees(@PathVariable Integer employee_id, @PathVariable Integer related_exceptiontypeemployees_id) {
		ExceptionTypeEmployee exceptiontypeemployee = exceptionTypeEmployeeDAO.findExceptionTypeEmployeeByPrimaryKey(related_exceptiontypeemployees_id, -1, -1);

		return exceptiontypeemployee;
	}

	/**
	* Delete an existing MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForTakerId/{medicinetake_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeMedicineTakesForTakerId(@PathVariable Integer employee_id, @PathVariable Integer related_medicinetakesfortakerid_id) {
		employeeService.deleteEmployeeMedicineTakesForTakerId(employee_id, related_medicinetakesfortakerid_id);
	}

	/**
	* Show all MedicineTake entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForPharmacistId", method = RequestMethod.GET)
	@ResponseBody
	public List<MedicineTake> getEmployeeMedicineTakesForPharmacistId(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<MedicineTake>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getMedicineTakesForPharmacistId());
	}

	/**
	* Delete an existing FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForEmployeeId/{foddertake_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeFodderTakesForEmployeeId(@PathVariable Integer employee_id, @PathVariable Integer related_foddertakesforemployeeid_id) {
		employeeService.deleteEmployeeFodderTakesForEmployeeId(employee_id, related_foddertakesforemployeeid_id);
	}

	/**
	* Create a new MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForTakerId", method = RequestMethod.POST)
	@ResponseBody
	public MedicineTake newEmployeeMedicineTakesForTakerId(@PathVariable Integer employee_id, @RequestBody MedicineTake medicinetake) {
		employeeService.saveEmployeeMedicineTakesForTakerId(employee_id, medicinetake);
		return medicineTakeDAO.findMedicineTakeByPrimaryKey(medicinetake.getId());
	}

	/**
	* Delete an existing TaskEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskEmployees/{taskemployee_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeTaskEmployees(@PathVariable Integer employee_id, @PathVariable Integer related_taskemployees_id) {
		employeeService.deleteEmployeeTaskEmployees(employee_id, related_taskemployees_id);
	}

	/**
	* Save an existing FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForWarehousekepperId", method = RequestMethod.PUT)
	@ResponseBody
	public FodderTake saveEmployeeFodderTakesForWarehousekepperId(@PathVariable Integer employee_id, @RequestBody FodderTake foddertakesforwarehousekepperid) {
		employeeService.saveEmployeeFodderTakesForWarehousekepperId(employee_id, foddertakesforwarehousekepperid);
		return fodderTakeDAO.findFodderTakeByPrimaryKey(foddertakesforwarehousekepperid.getId());
	}

	/**
	* Delete an existing Task entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/tasks/{task_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeTasks(@PathVariable Integer employee_id, @PathVariable Integer related_tasks_id) {
		employeeService.deleteEmployeeTasks(employee_id, related_tasks_id);
	}

	/**
	* Save an existing Except entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/excepts", method = RequestMethod.PUT)
	@ResponseBody
	public Except saveEmployeeExcepts(@PathVariable Integer employee_id, @RequestBody Except excepts) {
		employeeService.saveEmployeeExcepts(employee_id, excepts);
		return exceptDAO.findExceptByPrimaryKey(excepts.getId());
	}

	/**
	* Save an existing Inspection entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/inspections", method = RequestMethod.PUT)
	@ResponseBody
	public Inspection saveEmployeeInspections(@PathVariable Integer employee_id, @RequestBody Inspection inspections) {
		employeeService.saveEmployeeInspections(employee_id, inspections);
		return inspectionDAO.findInspectionByPrimaryKey(inspections.getId());
	}

	/**
	* View an existing Except entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/excepts/{except_id}", method = RequestMethod.GET)
	@ResponseBody
	public Except loadEmployeeExcepts(@PathVariable Integer employee_id, @PathVariable Integer related_excepts_id) {
		Except except = exceptDAO.findExceptByPrimaryKey(related_excepts_id, -1, -1);

		return except;
	}

	/**
	* Delete an existing FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForWarehousekepperId/{foddertake_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeFodderTakesForWarehousekepperId(@PathVariable Integer employee_id, @PathVariable Integer related_foddertakesforwarehousekepperid_id) {
		employeeService.deleteEmployeeFodderTakesForWarehousekepperId(employee_id, related_foddertakesforwarehousekepperid_id);
	}

	/**
	* Show all TaskManage entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskManages", method = RequestMethod.GET)
	@ResponseBody
	public List<TaskManage> getEmployeeTaskManages(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<TaskManage>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getTaskManages());
	}

	/**
	* Show all Task entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/tasks", method = RequestMethod.GET)
	@ResponseBody
	public List<Task> getEmployeeTasks(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<Task>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getTasks());
	}

	/**
	* Save an existing MedicineStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineStorages", method = RequestMethod.PUT)
	@ResponseBody
	public MedicineStorage saveEmployeeMedicineStorages(@PathVariable Integer employee_id, @RequestBody MedicineStorage medicinestorages) {
		employeeService.saveEmployeeMedicineStorages(employee_id, medicinestorages);
		return medicineStorageDAO.findMedicineStorageByPrimaryKey(medicinestorages.getId());
	}

	/**
	* Save an existing Sale entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/sales", method = RequestMethod.PUT)
	@ResponseBody
	public Sale saveEmployeeSales(@PathVariable Integer employee_id, @RequestBody Sale sales) {
		employeeService.saveEmployeeSales(employee_id, sales);
		return saleDAO.findSaleByPrimaryKey(sales.getId());
	}

	/**
	* View an existing Sale entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/sales/{sale_id}", method = RequestMethod.GET)
	@ResponseBody
	public Sale loadEmployeeSales(@PathVariable Integer employee_id, @PathVariable Integer related_sales_id) {
		Sale sale = saleDAO.findSaleByPrimaryKey(related_sales_id, -1, -1);

		return sale;
	}

	/**
	* View an existing Inspection entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/inspections/{inspection_id}", method = RequestMethod.GET)
	@ResponseBody
	public Inspection loadEmployeeInspections(@PathVariable Integer employee_id, @PathVariable Integer related_inspections_id) {
		Inspection inspection = inspectionDAO.findInspectionByPrimaryKey(related_inspections_id, -1, -1);

		return inspection;
	}

	/**
	* Create a new Task entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/tasks", method = RequestMethod.POST)
	@ResponseBody
	public Task newEmployeeTasks(@PathVariable Integer employee_id, @RequestBody Task task) {
		employeeService.saveEmployeeTasks(employee_id, task);
		return taskDAO.findTaskByPrimaryKey(task.getId());
	}

	/**
	* Save an existing TaskEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskEmployees", method = RequestMethod.PUT)
	@ResponseBody
	public TaskEmployee saveEmployeeTaskEmployees(@PathVariable Integer employee_id, @RequestBody TaskEmployee taskemployees) {
		employeeService.saveEmployeeTaskEmployees(employee_id, taskemployees);
		return taskEmployeeDAO.findTaskEmployeeByPrimaryKey(taskemployees.getId());
	}

	/**
	* Show all CurePig entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/curePigs", method = RequestMethod.GET)
	@ResponseBody
	public List<CurePig> getEmployeeCurePigs(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<CurePig>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getCurePigs());
	}

	/**
	* Delete an existing Inspection entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/inspections/{inspection_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeInspections(@PathVariable Integer employee_id, @PathVariable Integer related_inspections_id) {
		employeeService.deleteEmployeeInspections(employee_id, related_inspections_id);
	}

	/**
	* Delete an existing MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForPharmacistId/{medicinetake_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeMedicineTakesForPharmacistId(@PathVariable Integer employee_id, @PathVariable Integer related_medicinetakesforpharmacistid_id) {
		employeeService.deleteEmployeeMedicineTakesForPharmacistId(employee_id, related_medicinetakesforpharmacistid_id);
	}

	/**
	* View an existing Prevention entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/preventions/{prevention_id}", method = RequestMethod.GET)
	@ResponseBody
	public Prevention loadEmployeePreventions(@PathVariable Integer employee_id, @PathVariable Integer related_preventions_id) {
		Prevention prevention = preventionDAO.findPreventionByPrimaryKey(related_preventions_id, -1, -1);

		return prevention;
	}

	/**
	* Save an existing Prevention entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/preventions", method = RequestMethod.PUT)
	@ResponseBody
	public Prevention saveEmployeePreventions(@PathVariable Integer employee_id, @RequestBody Prevention preventions) {
		employeeService.saveEmployeePreventions(employee_id, preventions);
		return preventionDAO.findPreventionByPrimaryKey(preventions.getId());
	}

	/**
	* Delete an existing ExceptionTypeEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/exceptionTypeEmployees/{exceptiontypeemployee_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeExceptionTypeEmployees(@PathVariable Integer employee_id, @PathVariable Integer related_exceptiontypeemployees_id) {
		employeeService.deleteEmployeeExceptionTypeEmployees(employee_id, related_exceptiontypeemployees_id);
	}

	/**
	* Register custom, context-specific property editors
	* 
	*/
	@InitBinder
	public void initBinder(WebDataBinder binder, HttpServletRequest request) { // Register static property editors.
		binder.registerCustomEditor(java.util.Calendar.class, new org.skyway.spring.util.databinding.CustomCalendarEditor());
		binder.registerCustomEditor(byte[].class, new org.springframework.web.multipart.support.ByteArrayMultipartFileEditor());
		binder.registerCustomEditor(boolean.class, new org.skyway.spring.util.databinding.EnhancedBooleanEditor(false));
		binder.registerCustomEditor(Boolean.class, new org.skyway.spring.util.databinding.EnhancedBooleanEditor(true));
		binder.registerCustomEditor(java.math.BigDecimal.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(java.math.BigDecimal.class, true));
		binder.registerCustomEditor(Integer.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(Integer.class, true));
		binder.registerCustomEditor(java.util.Date.class, new org.skyway.spring.util.databinding.CustomDateEditor());
		binder.registerCustomEditor(String.class, new org.skyway.spring.util.databinding.StringEditor());
		binder.registerCustomEditor(Long.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(Long.class, true));
		binder.registerCustomEditor(Double.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(Double.class, true));
	}

	/**
	* Show all Sale entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/sales", method = RequestMethod.GET)
	@ResponseBody
	public List<Sale> getEmployeeSales(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<Sale>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getSales());
	}

	/**
	* Show all Employee entities
	* 
	*/
	@RequestMapping(value = "/Employee", method = RequestMethod.GET)
	@ResponseBody
	public List<Employee> listEmployees() {
		return new java.util.ArrayList<Employee>(employeeService.loadEmployees());
	}

	/**
	* Show all ExceptionTypeEmployee entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/exceptionTypeEmployees", method = RequestMethod.GET)
	@ResponseBody
	public List<ExceptionTypeEmployee> getEmployeeExceptionTypeEmployees(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<ExceptionTypeEmployee>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getExceptionTypeEmployees());
	}

	/**
	* Save an existing Task entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/tasks", method = RequestMethod.PUT)
	@ResponseBody
	public Task saveEmployeeTasks(@PathVariable Integer employee_id, @RequestBody Task tasks) {
		employeeService.saveEmployeeTasks(employee_id, tasks);
		return taskDAO.findTaskByPrimaryKey(tasks.getId());
	}

	/**
	* Create a new MedicineStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineStorages", method = RequestMethod.POST)
	@ResponseBody
	public MedicineStorage newEmployeeMedicineStorages(@PathVariable Integer employee_id, @RequestBody MedicineStorage medicinestorage) {
		employeeService.saveEmployeeMedicineStorages(employee_id, medicinestorage);
		return medicineStorageDAO.findMedicineStorageByPrimaryKey(medicinestorage.getId());
	}

	/**
	* Save an existing FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForEmployeeId", method = RequestMethod.PUT)
	@ResponseBody
	public FodderTake saveEmployeeFodderTakesForEmployeeId(@PathVariable Integer employee_id, @RequestBody FodderTake foddertakesforemployeeid) {
		employeeService.saveEmployeeFodderTakesForEmployeeId(employee_id, foddertakesforemployeeid);
		return fodderTakeDAO.findFodderTakeByPrimaryKey(foddertakesforemployeeid.getId());
	}

	/**
	* View an existing FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForEmployeeId/{foddertake_id}", method = RequestMethod.GET)
	@ResponseBody
	public FodderTake loadEmployeeFodderTakesForEmployeeId(@PathVariable Integer employee_id, @PathVariable Integer related_foddertakesforemployeeid_id) {
		FodderTake foddertake = fodderTakeDAO.findFodderTakeByPrimaryKey(related_foddertakesforemployeeid_id, -1, -1);

		return foddertake;
	}

	/**
	* View an existing MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForTakerId/{medicinetake_id}", method = RequestMethod.GET)
	@ResponseBody
	public MedicineTake loadEmployeeMedicineTakesForTakerId(@PathVariable Integer employee_id, @PathVariable Integer related_medicinetakesfortakerid_id) {
		MedicineTake medicinetake = medicineTakeDAO.findMedicineTakeByPrimaryKey(related_medicinetakesfortakerid_id, -1, -1);

		return medicinetake;
	}

	/**
	* Delete an existing FodderStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderStorages/{fodderstorage_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeFodderStorages(@PathVariable Integer employee_id, @PathVariable Integer related_fodderstorages_id) {
		employeeService.deleteEmployeeFodderStorages(employee_id, related_fodderstorages_id);
	}

	/**
	* Create a new RoleEmployee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/roleEmployees", method = RequestMethod.POST)
	@ResponseBody
	public RoleEmployee newEmployeeRoleEmployees(@PathVariable Integer employee_id, @RequestBody RoleEmployee roleemployee) {
		employeeService.saveEmployeeRoleEmployees(employee_id, roleemployee);
		return roleEmployeeDAO.findRoleEmployeeByPrimaryKey(roleemployee.getId());
	}

	/**
	* Create a new FodderStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderStorages", method = RequestMethod.POST)
	@ResponseBody
	public FodderStorage newEmployeeFodderStorages(@PathVariable Integer employee_id, @RequestBody FodderStorage fodderstorage) {
		employeeService.saveEmployeeFodderStorages(employee_id, fodderstorage);
		return fodderStorageDAO.findFodderStorageByPrimaryKey(fodderstorage.getId());
	}

	/**
	* Create a new Prevention entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/preventions", method = RequestMethod.POST)
	@ResponseBody
	public Prevention newEmployeePreventions(@PathVariable Integer employee_id, @RequestBody Prevention prevention) {
		employeeService.saveEmployeePreventions(employee_id, prevention);
		return preventionDAO.findPreventionByPrimaryKey(prevention.getId());
	}

	/**
	* View an existing Feed entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/feeds/{feed_id}", method = RequestMethod.GET)
	@ResponseBody
	public Feed loadEmployeeFeeds(@PathVariable Integer employee_id, @PathVariable Integer related_feeds_id) {
		Feed feed = feedDAO.findFeedByPrimaryKey(related_feeds_id, -1, -1);

		return feed;
	}

	/**
	* Show all Inspection entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/inspections", method = RequestMethod.GET)
	@ResponseBody
	public List<Inspection> getEmployeeInspections(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<Inspection>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getInspections());
	}

	/**
	* Create a new Inspection entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/inspections", method = RequestMethod.POST)
	@ResponseBody
	public Inspection newEmployeeInspections(@PathVariable Integer employee_id, @RequestBody Inspection inspection) {
		employeeService.saveEmployeeInspections(employee_id, inspection);
		return inspectionDAO.findInspectionByPrimaryKey(inspection.getId());
	}

	/**
	* Show all Feed entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/feeds", method = RequestMethod.GET)
	@ResponseBody
	public List<Feed> getEmployeeFeeds(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<Feed>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getFeeds());
	}

	/**
	* View an existing MedicineTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineTakesForPharmacistId/{medicinetake_id}", method = RequestMethod.GET)
	@ResponseBody
	public MedicineTake loadEmployeeMedicineTakesForPharmacistId(@PathVariable Integer employee_id, @PathVariable Integer related_medicinetakesforpharmacistid_id) {
		MedicineTake medicinetake = medicineTakeDAO.findMedicineTakeByPrimaryKey(related_medicinetakesforpharmacistid_id, -1, -1);

		return medicinetake;
	}

	/**
	* Show all TaskEmployee entities by Employee
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/taskEmployees", method = RequestMethod.GET)
	@ResponseBody
	public List<TaskEmployee> getEmployeeTaskEmployees(@PathVariable Integer employee_id) {
		return new java.util.ArrayList<TaskEmployee>(employeeDAO.findEmployeeByPrimaryKey(employee_id).getTaskEmployees());
	}

	/**
	* View an existing FodderStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderStorages/{fodderstorage_id}", method = RequestMethod.GET)
	@ResponseBody
	public FodderStorage loadEmployeeFodderStorages(@PathVariable Integer employee_id, @PathVariable Integer related_fodderstorages_id) {
		FodderStorage fodderstorage = fodderStorageDAO.findFodderStorageByPrimaryKey(related_fodderstorages_id, -1, -1);

		return fodderstorage;
	}

	/**
	* Delete an existing Employee entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployee(@PathVariable Integer employee_id) {
		Employee employee = employeeDAO.findEmployeeByPrimaryKey(employee_id);
		employeeService.deleteEmployee(employee);
	}

	/**
	* View an existing MedicineStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/medicineStorages/{medicinestorage_id}", method = RequestMethod.GET)
	@ResponseBody
	public MedicineStorage loadEmployeeMedicineStorages(@PathVariable Integer employee_id, @PathVariable Integer related_medicinestorages_id) {
		MedicineStorage medicinestorage = medicineStorageDAO.findMedicineStorageByPrimaryKey(related_medicinestorages_id, -1, -1);

		return medicinestorage;
	}

	/**
	* View an existing FodderTake entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderTakesForWarehousekepperId/{foddertake_id}", method = RequestMethod.GET)
	@ResponseBody
	public FodderTake loadEmployeeFodderTakesForWarehousekepperId(@PathVariable Integer employee_id, @PathVariable Integer related_foddertakesforwarehousekepperid_id) {
		FodderTake foddertake = fodderTakeDAO.findFodderTakeByPrimaryKey(related_foddertakesforwarehousekepperid_id, -1, -1);

		return foddertake;
	}

	/**
	* Save an existing FodderStorage entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/fodderStorages", method = RequestMethod.PUT)
	@ResponseBody
	public FodderStorage saveEmployeeFodderStorages(@PathVariable Integer employee_id, @RequestBody FodderStorage fodderstorages) {
		employeeService.saveEmployeeFodderStorages(employee_id, fodderstorages);
		return fodderStorageDAO.findFodderStorageByPrimaryKey(fodderstorages.getId());
	}

	/**
	* Create a new Feed entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/feeds", method = RequestMethod.POST)
	@ResponseBody
	public Feed newEmployeeFeeds(@PathVariable Integer employee_id, @RequestBody Feed feed) {
		employeeService.saveEmployeeFeeds(employee_id, feed);
		return feedDAO.findFeedByPrimaryKey(feed.getId());
	}

	/**
	* Delete an existing CurePig entity
	* 
	*/
	@RequestMapping(value = "/Employee/{employee_id}/curePigs/{curepig_id}", method = RequestMethod.DELETE)
	@ResponseBody
	public void deleteEmployeeCurePigs(@PathVariable Integer employee_id, @PathVariable Integer related_curepigs_id) {
		employeeService.deleteEmployeeCurePigs(employee_id, related_curepigs_id);
	}
}